﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>微街秀 > 广告详情</title>
    <link href="plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="plugins/font-awesome-4.3.0/css/font-awesome.min.css" rel="stylesheet"
        type="text/css" />
    <link rel="stylesheet" type="text/css" href="css/css.css" />
    <link rel="stylesheet" type="text/css" href="css/base.css" />
    <link href="css/gl.css" rel="stylesheet" type="text/css" />
    <style>
        body{background-color: #eaeaea;}
        .option-item{margin-left: -15px;margin-right: -15px;padding-left:10px;padding-right:10px;}
        .option-item .media-left > div{width: 60px;text-align: right;}
        .bottonline{width: 100%;height: 5px;background-image: url(img/Makeimg/11.png);}
    </style>
</head>
<body>
    <div>
        <div class="media top-nav-body">
            <div class="media-left back">
                <div class="top-left">
                    <i class="fa fa-angle-left"></i>
                </div>
            </div>
            <div class="media-body">
                <div class="top-title">
                    广告详情</div>
            </div>
            <div class="media-right">
                <div class="top-right">
                </div>
            </div>
        </div>
    </div>
    <div class="container-fluid bg-white">
        <div class="media option-item bb pt20 pb20">
            <div class="media-left"><div>广告主题:</div></div>
            <div class="media-body gray title"></div>
        </div>
        <div class="media option-item bb pb20">
            <div class="media-left">
                <div>广告商ID:</div>
            </div>
            <div class="media-body gray by_user_id"></div>
        </div>
        <div class="media option-item bb  pb20">
            <div class="media-left">
                <div>广&nbsp;&nbsp;告&nbsp;&nbsp;商:</div>
            </div>
            <div class="media-body gray nick_name"></div>
        </div>
        <div class="media option-item bb  pb20">
            <div class="media-left"><div>分享数量:</div></div>
            <div class="media-body gray op_total">0</div>
        </div>
        <div class="media option-item bb  pb20">
            <div class="media-left"><div>分享价格:</div></div>
            <div class="media-body gray"><span class='op_price'>0</span></div>
        </div>
        <div class="media option-item  pb20">
            <div class="media-left"><div>分享地区:</div></div>
            <div class="media-body gray area"></div>
        </div>
    </div>
    <div class="bottonline"></div>
    <script src="js/jquery-2.1.4.min.js" type="text/javascript"></script>
    <script src="js/ajax-data.js"></script>
    <script src="js/base.js"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script>
        var page = 1;
        $(document).ready(function () {
            load(page);
            $(".back").bind("click", function () { window.location.href = 'fl_list.html?&tag=' + getQueryString("tag") });
        });

        function load(page) {
            if (!islogin()) { window.location.href = 'login.html'; return; }
            var id = getUrlArgStr("id");
            if (id == "") return;
            AjaxStart("ajax/fc_record.ashx?getdetail", "&id=" + id, function (data) {
                if (data.code != 0) {
                    Alert(data.msg);
                    return;
                }
                loadhtml(data.item);
            });
        }

        function loadhtml(item) {
            $(".by_user_id").html(item["by_user_id"]);
            $(".op_price").html(item["op_price"] + "元");
            if (item["op_remainder"] > 0)
                $(".op_total").html((item["op_total"] - item["op_remainder"]) + "个 [未结束]");
            else
                $(".op_total").html((item["op_total"] - item["op_remainder"]) + "个 [已结束]");
            $(".nick_name").html(item["nick_name"]);
            $(".title").html("<a href='fc_detail.aspx?article_id=" + item['articleid'] + "'>" + item["title"] + "</a>");

            var area = "";
            if (item["op_area1"] != null && item["op_area1"] != '')
                area += item["op_area1"];
            if (item["op_area2"] != null && item["op_area2"] != '')
                area += "-" + item["op_area2"];
            if (item["op_area3"] != null && item["op_area3"] != '')
                area += "-" + item["op_area3"];
            $(".area").html(area);
        }
    </script>
</body>
</html>
